Skip to content

refactor(ios): trim the alert path's forwarding and duplicate constructors - #4129

Merged
thymikee merged 1 commit into
mainfrom
refactor/alert-small-cleanup
Nov 1, 2026
Merged

thymikee merged 1 commit into
mainfrom
refactor/alert-small-cleanup

Conversation

@thymikee

@thymikee thymikee commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

A cleanup of the iOS alert path with no behavior change. 3 files, +21 / −69 (net −48).

  • snapshot-alert.ts: each admission branch now calls its narrowed runtime operation directly. The four forwarding functions are removed. The four separately typed admission branches stay, so capability narrowing is unchanged.
  • RunnerTests+Alert.swift: the two runnerAlert(...) constructors are now one. It takes the resolved actions and an optional window.
  • RunnerTests+Alert.swift: the enabled and hittable button reads use the existing safely helper instead of a bespoke ObjC exception wrapper. Small scope expansion: the audit named only the enabled read; the hittable probe used the same wrapper. A caught exception is now also logged under its tag.
  • RunnerTests+SystemModal.swift: removed the redundant action-type check. Its only caller queries descendants only by actionableTypes.

Validation

At 3cc11f8a30:

  • pnpm check:affected --run --head HEAD: all runnable checks passed (exactCommit=true).
  • snapshot-alert.test.ts: 7/7 passed.
  • Runner build-for-testing: iOS and macOS, normal and unit-test variants, all succeeded.
  • Alert unit tests on an iPad (A16) simulator, method-level -only-testing for every test in RunnerTests+Alert*, +SystemModalTests, +BlockingSystemModal*: 41 executed (the 42nd is tvOS/macOS-only), 1 skipped (capture-only), 39 passed. The 1 failure, testAlertActivationConfirmsBeforeDeadlineWithoutHandlingTheNotificationBanner ("needs notification authorization"), fails the same way on an origin/main build on the same simulator, so it comes from the simulator's state.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…ctors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-device-website Ready Ready Preview Nov 1, 2026 7:11am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.67 MB 5.67 MB -512 B
Package (unpacked) 5.67 MB 5.66 MB -512 B
Package (download) 1.72 MB 1.72 MB -32 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 30.2 ms 29.6 ms -0.6 ms
CLI --help 58.7 ms 59.2 ms +0.5 ms

@thymikee

thymikee commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

I found no problems in the code at 3cc11f8. The trimmed forwarding and merged constructors in the alert path read as equivalent to the old behavior. This comes from reading the diff and the head sources. I did not build the Swift runner or run simulator tests, so the 39/41 alert unit tests and the build-for-testing runs in the description are the author's numbers, and I have not checked them. No live CLI alert run was captured either. CI is still pending: one of the three Smoke Tests jobs is in progress, and it is most likely the Apple smoke job that exercises the runner this PR touches. Nothing is failing, and Lint/Typecheck, Integration, Coverage, Repo Guards and the other two Smoke Tests jobs pass. There are no conflicts. Please let that Apple smoke job finish green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 1, 2026
@thymikee
thymikee merged commit 38e9281 into main Nov 1, 2026
18 checks passed
@thymikee
thymikee deleted the refactor/alert-small-cleanup branch November 1, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant